
<div class="noprint">
    <!--操作按钮-->
    <#if isManage==0 >
    <!--普通用户处理-->
        <#if mapButton?? && (mapButton.button)!''>
            <#if (isSignTask==true && isAllowDirectExecute==true)>
                <div class="group">
                    特权：<input type="checkbox" lay-skin="primary" value="1" id="chkDirectComplete"><label for="chkDirectComplete"> 直接结束</label>
                </div>
            </#if>
            <#list mapButton.button as btn>
                <!--  同意-->
                <#if btn.operatortype==1>
                    <button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="agree" id="btnAgree"><i class="layui-icon layui-icon-ok"></i>${btn.btnname}</button>
                </#if>
                <!--  反对-->
                <#if btn.operatortype==2>
                    <button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="against"><i class="iconfont iconminus-circle"></i>${btn.btnname}</button>
                </#if>
                <!--  弃权-->
                <#if btn.operatortype==3>
                    <#if isSignTask==true>
                        <button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="abandon"><i class="iconfont iconicon_warn"></i>${btn.btnname}</button>
                    </#if>
                </#if>
                <!--  驳回-->
                <#if btn.operatortype==4>
                    <#if isCanBack==true>
                        <button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="reject"><i class="layui-icon layui-icon-return"></i>${btn.btnname}</button>
                    </#if>
                </#if>
                <!--  驳回到发起人-->
                <#if btn.operatortype==5>
                    <#if isCanBack==true && toBackNodeId!=task.taskDefinitionKey>
                        <button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="rejectToStart"><i class="iconfont iconchehuisekuai"></i>${btn.btnname}</button>
                    </#if>
                </#if>
                <!--  转交代办-->
                <#if btn.operatortype==6 && isCanAssignee=true>
                    <button type="button" class="layui-btn layui-btn-sm goForward"><i class="iconfont iconget"></i>${btn.btnname}</button>
                </#if>
                <!--  补签-->
                <#if btn.operatortype==7>
                    <#if isSignTask==true && isAllowRetoactive==true>
                        <button type="button" class="layui-btn layui-btn-sm retoActive" ><i class="layui-icon"></i>${btn.btnname}</button>
                    </#if>
                </#if>
                <!--  保存表单-->
                <#if btn.operatortype==8>
                    <button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="save"><i class="layui-icon layui-icon-list"></i>${btn.btnname}</button>
                </#if>
                <!--  流程图-->
                <#if btn.operatortype==9>
                    <button type="button" class="layui-btn layui-btn-sm flowChart"><i class="layui-icon layui-icon-picture-fine"></i>${btn.btnname}</button>
                </#if>
                <!--  打印-->
                <!--<#if btn.operatortype==10>
                    <button type="button" class="layui-btn layui-btn-sm"><i class="layui-icon"></i>${btn.btnname}</button>
                </#if>-->
                <!--  审批历史-->
                <#if btn.operatortype==11>
                    <button type="button" class="layui-btn layui-btn-sm taskOpinions"><i class="iconfont iconicon_compile"></i>${btn.btnname}</button>
                </#if>
                <!--  审批历史-->
                <#if btn.operatortype==12>
                    <button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="freeBack"><i class="layui-icon layui-icon-return"></i>自由回退</button>
                </#if>
                <!--  沟通-->
                <#if btn.operatortype==16>
                    <button type="button" class="layui-btn layui-btn-sm communication"><i class="layui-icon layui-icon-dialogue"></i>${btn.btnname}</button>
                </#if>
                <!--  加签-->
                <#if btn.operatortype==17 && task.description!='39'>
                    <button type="button" class="layui-btn layui-btn-sm addTransTo"><i class="layui-icon layui-icon-add-1"></i>${btn.btnname}</button>
                </#if>
            </#list>
        <#else>
            <#if (isSignTask==true && isAllowDirectExecute==true)>
                <div class="group">
                    特权：<input type="checkbox" lay-skin="primary" value="1" id="chkDirectComplete"><label for="chkDirectComplete">直接结束</label>
                </div>
            </#if>
            <button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="agree"><i class="layui-icon layui-icon-ok"></i>同意</button>
            <#if isSignTask==true>
                <button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="against"><i class="iconfont iconminus-circle"></i>反对</button>
                <button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="abandon"><i class="iconfont iconicon_warn"></i>弃权</button>
                <#if isAllowRetoactive==true>
                    <button type="button" class="layui-btn layui-btn-sm retoActive"><i class="layui-icon"></i>补签</button>
                </#if>
            </#if>
            <button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="save"><i class="layui-icon layui-icon-list"></i>保存表单</button>
            <#if isCanAssignee=true>
                <button type="button" class="layui-btn layui-btn-sm goForward"><i class="iconfont iconget"></i>转交代办</button>
            </#if>
            <#if isCanBack==true>
                <button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="reject"><i class="layui-icon layui-icon-return"></i>驳回</button>
                <button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="rejectToStart"><i class="iconfont iconchehuisekuai"></i>驳回到发起人</button>
            </#if>
            <button type="button" class="layui-btn layui-btn-sm flowChart"><i class="layui-icon layui-icon-picture-fine"></i>流程图</button>
            <button type="button" class="layui-btn layui-btn-sm taskOpinions"><i class="iconfont iconicon_compile"></i>审批历史</button>
            <button type="button" class="layui-btn layui-btn-sm communication"><i class="layui-icon layui-icon-dialogue"></i>沟通</button>
            <#if isSignTask==false && task.description!='39'>
                <button type="button" class="layui-btn layui-btn-sm addTransTo"><i class="layui-icon layui-icon-add-1"></i>加签</button>
            </#if>
            <!--<button type="button" class="layui-btn layui-btn-sm"><i class="layui-icon"></i>打印</button>-->
        </#if>

    <#else>

    <!--管理员处理-->
        <#if (isSignTask==true && isAllowDirectExecute==true)>
            <div class="group">
                特权：<input type="checkbox" value="1" lay-skin="primary" id="chkDirectComplete"><label for="chkDirectComplete">直接结束</label>
            </div>
        </#if>
        <button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="agree"><i class="layui-icon layui-icon-ok"></i>同意</button>
        <#if isSignTask==true>
            <button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="against"><i class="iconfont iconminus-circle"></i>反对</button>
            <button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="abandon"><i class="iconfont iconicon_warn"></i>弃权</button>
            <#if isAllowRetoactive==true>
                <button type="button" class="layui-btn layui-btn-sm retoActive"><i class="layui-icon"></i>补签</button>
            </#if>
        </#if>
        <button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="save"><i class="layui-icon layui-icon-list"></i>保存表单</button>
        <#if isCanBack==true>
            <button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="reject"><i class="layui-icon layui-icon-return"></i>驳回</button>
            <button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="rejectToStart"><i class="iconfont iconchehuisekuai"></i>驳回到发起人</button>
        </#if>
        <button type="button" class="layui-btn layui-btn-sm" lay-submit lay-filter="freeBack"><i class="layui-icon layui-icon-return"></i>自由回退</button>
        <button type="button" class="layui-btn layui-btn-sm layui-btn-danger endProcess"><i class="iconfont iconicon_roundreduce"></i>终止</button>
        <button type="button" class="layui-btn layui-btn-sm flowChart"><i class="layui-icon layui-icon-picture-fine"></i>流程图</button>
        <button type="button" class="layui-btn layui-btn-sm taskOpinions"><i class="iconfont iconicon_compile"></i>审批历史</button>
        <button type="button" class="layui-btn layui-btn-sm communication"><i class="layui-icon layui-icon-dialogue"></i>沟通</button>
        <#if isSignTask==false && task.description!='39'>
            <button type="button" class="layui-btn layui-btn-sm addTransTo"><i class="layui-icon layui-icon-add-1"></i>加签</button>
        </#if>
        <!--<button type="button" class="layui-btn layui-btn-sm"><i class="layui-icon"></i>打印</button>-->
    </#if>
    <#if actDefModel.allowRefer==1>
        <!-- 流程参考 -->
        <button type="button" class="layui-btn layui-btn-sm reference"><i class="layui-icon text-adjust"></i>流程参考</button>
    </#if>
    <span style="margin-left: 10px;">
        <!--跳转路径按钮-->
        <#if isManage==0>
            <#if bpmNodeSet.jumpType?contains("1")>
                <input type="radio" name="jumpType" lay-filter="jumpType" <#if !isHandChoose>checked</#if> value="1" title="正常跳转">
            </#if>
            <#if bpmNodeSet.jumpType?contains("2")>
                <input type="radio" name="jumpType" lay-filter="jumpType" <#if isHandChoose>checked</#if>  value="2" title="选择路径跳转">
            </#if>
            <#if bpmNodeSet.jumpType?contains("3")>
                <input type="radio" name="jumpType" lay-filter="jumpType" value="3" title="自由跳转">
            </#if>
        </#if>
        <#if isManage==1>
                <input type="radio" name="jumpType" lay-filter="jumpType" <#if !isHandChoose>checked</#if> value="1" title="正常跳转">
                <input type="radio" name="jumpType" lay-filter="jumpType" <#if isHandChoose>checked</#if>  value="2" title="选择路径跳转">
                <input type="radio" name="jumpType" lay-filter="jumpType" value="3" title="自由跳转">
        </#if>
    </span>
    <!--流程帮助-->
    <#if sysFile??  && (sysFile?size >0)>
        <#if sysFile!="0">
            <!--个人附件-->
            <div class="layui-layout-right" style="position: absolute; right: 30px; top: 30px;">流程帮助
                <i class="iconfont iconicon_yiwenkongxin" id="helpFile" onclick="helpFile('${sysFile.fileId}','${sysFile.fileName}')"  style="font-size: 20px"></i>
            </div>
        </#if>
    </#if>
</div>

<script type="text/javascript">

    //流程帮助，下载附件
    function helpFile(_fileId,_fileName) {
        layer.confirm('确定下载附件【'+(_fileName!=undefined?_fileName:null)+'】吗？', {
            btn: ['是', '否'] //按钮
        }, function (index) {
            if(_fileId==undefined||_fileId==''){
                layer.msg("附件不存在，请重新选择！",{icon:5,time:1000});
            }else {
                window.open(serverPath.systemPath + setter.sysLinkPath + "attachFile/download?fileId=" + _fileId);
            }
            layer.close(index);
        });
    }

    //前置脚本
    function beforeClick(operatorType){
    <#if (mapButton.button)!''>
        switch(operatorType){
            <#list mapButton.button as btn>
            <#if btn.prevscript!''>
            case ${btn.operatortype}:
                ${btn.prevscript}
                break;
            </#if>
            </#list>
        }
    </#if>
    }

    //后置脚本
    function afterClick(operatorType){
    <#if (mapButton.button)!''>
        switch(operatorType){
            <#list mapButton.button as btn>
            <#if btn.afterscript!''>
            case ${btn.operatortype}:
                ${btn.afterscript}
                break;
            </#if>
            </#list>
        }
    </#if>
    }

</script>
